<template>
  <div class="goodsimageinfo-container">
    <h3 class="title">{{ currentGoods.title }}</h3>
    <hr>
    <div class="content" v-html="currentGoods.content"></div>
  </div>
</template>

<script>
import {Toast} from 'mint-ui';

export default {
  data(){
    return {
      id: this.$route.params.id,
      currentGoods: {}
    }
  },
  created() {
    this.getGoodsList(this.id)
  },
  methods: {
    getGoodsList(goods_id) {
      this.$http.get('goods/'+goods_id).then(result => {
        this.currentGoods = result.body
      }, error => {
        Toast('商品详情获取失败！')
      })
    }
  }
};
</script>

<style lang="scss" scoped>
.goodsimageinfo-container{
    padding: 0 4px;
    .title{
      padding: 15px 0;
      font-size: 17px;
      text-align: center
    }
    .content{
      img {
        width: 100%;
      }
    }
}
</style>
